package com.ruoyi.common.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.security.PrivateKey;

/**
 * @ClassName WxPayProperties
 * @Description TODO
 * @Author Mr、Liu
 * @Date 2025/6/26 0:17
 * @Version 1.0
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "wx.pay", ignoreInvalidFields = true)
public class WxPayProperties {
    /**
     * 设置微信公众号或者小程序等的appid
     */
    private String appId;

    /**
     * 微信支付商户号
     */
    private String mchId;

    private String mchSerialNumber;

    /**
     * 微信支付商户密钥
     */
    private String apiV3Key;

    /**
     * apiclient_cert.p12文件的绝对路径，或者如果放在项目中，请以classpath:开头指定
     */
    private String keyPath;

    /**
     * 读取后的私钥对象
     */
    private PrivateKey privateKey;

    private String refundNotifyUrl;

    private String payNotifyUrl;
}
